Rank of a Matrix

Introduction

The rank of a matrix is one of the most important ideas in linear algebra.
It tells us how much useful information a matrix contains.

You already know how to compute RREF, so this article will show you how RREF reveals the rank and what the rank tells us about vectors, systems of equations, and dimensions.

What Is Rank?

At a high level:

A matrix with:

Why Rank Matters

Rank tells us:

Some useful interpretations:

All of these numbers are equal.

Computing Rank Using RREF

To compute the rank of a matrix:

  1. Convert the matrix to RREF.
  2. Count the number of pivot columns (columns with a leading 1).
  3. That count is the rank.

Example: $$\begin{bmatrix} 1 & 2 & 3 \\ 2 & 4 & 6 \\ 1 & 1 & 1 \end{bmatrix} \longrightarrow \begin{bmatrix} 1 & 0 & -1 \\ 0 & 1 & 2 \\ 0 & 0 & 0 \end{bmatrix}$$

Interpreting Rank

Some common interpretations:

1. Rank and Linear Independence

2. Rank and Solutions to Linear Systems

For a system $A x = b$:

3. Rank and Dimension

Rank tells you the dimension of:

Examples

Example 1: A full-rank matrix

$$A = \begin{bmatrix} 1 & 0 \\ 0 & 1 \end{bmatrix}$$

Example 2: A low-rank matrix

$$B = \begin{bmatrix} 1 & 2 \\ 2 & 4 \end{bmatrix}$$

Calculator

Calculating the rank

  • We can calculate the rank of a matrix using the $\operatorname{rank}()$ function:
rank([1, 2; 3, 6]) rank([1, 0; 0, 1])

Exercises

  1. Compute the rank of $$\begin{bmatrix}1 & 2 \\ 3 & 6\end{bmatrix}$$

    Solution

    Matrix: $$\begin{bmatrix}1 & 2 \\ 3 & 6\end{bmatrix}$$ Row 2 is a multiple of Row 1 → rank = 1.

  2. Compute the rank of $$\begin{bmatrix}1 & 0 & 1 \\ 0 & 1 & 1\end{bmatrix}$$

    Solution

    Matrix: $$\begin{bmatrix}1 & 0 & 1 \\ 0 & 1 & 1\end{bmatrix}$$ Two pivots → rank = 2.

  3. Determine whether the columns of $$\begin{bmatrix}2 \\ 4\end{bmatrix},\ \begin{bmatrix}1 \\ 2\end{bmatrix}$$ are linearly independent.

    Solution

    Vectors $(2,4)$ and $(1,2)$ are multiples of each other → not independent.

  4. Find the rank of the matrix $$\begin{bmatrix}1 & 1 & 1 \\ 1 & 2 & 3 \\ 2 & 3 & 4\end{bmatrix}$$

    Solution

    Matrix: $$\begin{bmatrix}1 & 1 & 1 \\ 1 & 2 & 3 \\ 2 & 3 & 4\end{bmatrix}$$ RREF has two pivots → rank = 2.

  5. True or false: A $3\times 3$ matrix with rank 1 has columns that all lie on a single line.

    Solution

    True.
    Rank 1 means all columns lie on a single line through the origin.

  6. Compute the rank of $$\begin{bmatrix}0 & 0 & 0 \\ 0 & 5 & 0 \\ 0 & 0 & 7\end{bmatrix}$$

    Solution

    Matrix: $$\begin{bmatrix}0 & 0 & 0 \\ 0 & 5 & 0 \\ 0 & 0 & 7\end{bmatrix}$$ Two nonzero rows → rank = 2.

  7. Determine whether the system $A x = 0$ has non‑trivial solutions when $$A = \begin{bmatrix}1 & 2 & 3 \\ 2 & 4 & 6\end{bmatrix}$$

    Solution

    Matrix: $$\begin{bmatrix}1 & 2 & 3 \\ 2 & 4 & 6\end{bmatrix}$$ Rank = 1 < number of columns (3) → the system has non‑trivial solutions.